<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>会员登录</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/bootstrap/css/bootstrap.min.css" type="text/css"/>
    <script src="${pageContext.request.contextPath}/bootstrap/js/jquery-1.11.3.min.js" type="text/javascript"></script>
    <script src="${pageContext.request.contextPath}/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
    <!-- 引入自定义css文件 style.css -->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/bootstrap/css/style.css" type="text/css"/>
    <link rel="stylesheet" href="${pageCOntext.request.contextPath}/css/common.css" type="text/css"/>
</head>
<body>

<div class="container-fluid">
    <div class="col-md-4">
        <img src="${pageContext.request.contextPath}/images/logo.png"/>
    </div>
    <div class="col-md-5">
        <img src="${pageContext.request.contextPath}/images/header.png"/>
    </div>
    <div class="col-md-3" style="padding-top:20px">
        <a href="${pageContext.request.contextPath}/Forum">首页</a>
    </div>
</div>

<div class="container"
     style="width: 90%; height: 460px; background: white url('${pageContext.request.contextPath}/images/loginbg.jpg') no-repeat;">
    <div class="row">
        <div class="col-md-7">
            <!--<img src="./image/login.jpg" width="500" height="330" alt="会员登录" title="会员登录">-->
        </div>

        <div class="col-md-5">
            <div
                    style="width: 440px; border: 1px solid #E7E7E7; padding: 20px 0 20px 30px; border-radius: 5px; margin-top: 60px; background: #fff;">
                <font>会员登录</font>USER LOGIN &nbsp;&nbsp;&nbsp;&nbsp;<span
                    style="color: red;">${requestScope.info}</span>
                <div>&nbsp;</div>
                <!-- 访问controller - user?method=login
                                    - form表单  -  hidden隐藏框
                -->
                <form class="form-horizontal" method="post" action="${pageContext.request.contextPath }/User">
                    <input type="hidden" name="method" value="login">

                    <div class="form-group">
                        <label for="username" class="col-sm-2 control-label">用户名</label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" id="username" name="username"
                                   placeholder="请输入用户名">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputPassword3" class="col-sm-2 control-label">密码</label>
                        <div class="col-sm-6">
                            <input type="password" class="form-control" id="inputPassword3" name="password"
                                   placeholder="请输入密码">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputPassword3" class="col-sm-2 control-label">验证码</label>
                        <div class="col-sm-3">
                            <input type="text" class="form-control" id="inputPassword3" name="checkCode"
                                   placeholder="验证码">
                        </div>
                        <div class="col-sm-3">
                            <img alt="验证码" id="imagecode" src="<%= request.getContextPath()%>/yanzheng"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <div class="checkbox">
                                <label>
                                    <input type="checkbox" name="autoLogin" value="autoLogin">自动登录
                                </label>
                                <span style="color: red;">${requestScope.infor}</span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <input type="submit" width="100" value="登录" name="submit"
                                   style="background: url('${pageContext.request.contextPath}/images/login.gif') no-repeat scroll 0 0 rgba(0, 0, 0, 0); height: 35px; width: 100px; color: white;">
                            <a href="${pageContext.request.contextPath}/User?method=register">还无账号?注册</a>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<!-- 引入footer.jsp -->
<jsp:include page="footer.jsp"></jsp:include>

</body>
</html>